<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui" >
<ui:composition
	template="#{pageContext.servletContext.contextPath}/templates/template.xhtml">
	<ui:define name="title">
		<h:outputText value="#{msg.grupo_titulo}" />
	</ui:define>

	<ui:define name="context">
		<h:form>
			<p:messages showDetail="true" showSummary="false" />
			<p:panel header="#{msg.action_cadastrar}">
				<h:inputHidden value="#{actionBean.entity.status}" for="cdAction" />
				
				<h:panelGrid columns="2" style="width:100%" columnClasses="headerColumn alignRight bold" >
					<h:outputLabel value="#{msg.action_cdaction}*:"
						rendered="#{actionBean.entity.status ne 'I'}" />
					<p:inputText value="#{actionBean.entity.cdAction}" id="cdAction"
						style="width:50px;" rendered="#{actionBean.entity.status ne 'I'}"
						readonly="true" />

					<h:outputLabel value="#{msg.action_deaction}*:" for="deAction" />
					<p:inputText value="#{actionBean.entity.deAction}" required="true" id="deAction"
						requiredMessage="#{msg.action_deaction_requirido}" maxlength="45"
						style="width: 100%" />

					<h:outputLabel value="#{msg.action_nmaction}*:" for="nmAction" />
					<p:inputText value="#{actionBean.entity.nmAction}" required="true" id="nmAction"
						requiredMessage="#{msg.action_nmaction_requirido}" maxlength="45"
						style="width: 100%" />

				</h:panelGrid>
				<f:facet name="footer">
					<p:commandButton value="#{msg.button_save}" action="#{actionBean.save}" ajax="false" />
					<p:commandButton value="#{msg.button_novo}" action="#{actionBean.adicionar}" ajax="false" immediate="true" />
					
					<p:commandButton value="#{msg.button_excluir}" action="#{actionBean.excluir}" ajax="false"
						onclick="return confirm('#{msg.confirma_exclusao_registro}')"
						rendered="#{actionBean.entity.status ne 'I'}" />
						
					<p:commandButton value="#{msg.button_voltar}" action="eltcConAction" ajax="false" immediate="true" />
				</f:facet>
			</p:panel>
		</h:form>


	</ui:define>
</ui:composition>
</html>